# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=ampy
pkgver=0.20171212
pkgrel=3
pkgdesc="Utility to interact with a MicroPython board over a serial connection"
url="https://github.com/adafruit/ampy"
arch="noarch"
license="MIT"
depends="python3 py3-serial py3-click py3-setuptools"
subpackages="$pkgname-doc"
_commit="d3df5f57398c581f8a6c1b930b740fd7060e6833"
source="https://github.com/adafruit/ampy/archive/$_commit/master.tar.gz"

builddir="$srcdir/$pkgname-$_commit"

prepare() {
	touch CONTRIBUTING.md
}

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr \
		--root="$pkgdir"

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -m644 CONTRIBUTING.md README.md \
		"$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="b075745030e924be6bc0eb83fbb2960f27932dd44399a8fe6ce1e54bfbb2bdeba9c159db1add337023327a86ca3808479873afc92ff99b9c024e244cb53bafd5  master.tar.gz"
